<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<title>默认丢弃</title>
	<!--引入Vue库-->
	<script src="vue.js"></script>
</head>
<body>	
<div id="app">
  <parent></parent>
</div>
<script>
  var childNode = {
      template: `
        <div class="child">
           <p>子组件</p>
        </div>
        `,
    };
  var parentNode = {
      template: `
        <div class="parent">
            <p>父组件</p>
            <child>
               <p>测试内容</p>
            </child>
        </div>
        `,
      components: {
        'child': childNode
      },
  };
  // 创建根实例
  var vm=new Vue({
      el: '#app',
      components: {
        'parent': parentNode
      }
  })
</script>
</body>
</html>
